package it.unina.lab.config;

import android.util.Log;

public class Logger {
	
	public static final String DEFAULT_TAG = "Multimodal";
	private static Logger logger = null;
	
	
	private Logger(){
		
	}	
	
	/* SINGLETON */
	public static Logger getLogger(){
		if(logger == null)
			logger = new Logger();
		
			return logger;
	}
	
	
	
	public boolean isDebugEnabled(){
		return true;
		//return Log.isLoggable(TAG, Log.DEBUG);
	}
	
	
	
	/*** INFO LOGGER ***/
	public void info(String message){
		Log.i(DEFAULT_TAG, message);
	}
	
	public void info(String TAG, String message){
		Log.i(TAG, message);
	}
	
	public void info(String message, Throwable e ){	
		Log.i(DEFAULT_TAG, message, e);
	}
	
	public void info(String TAG, String message, Throwable e ){	
		Log.i(TAG, message, e);
	}
	
	
	
	/*** DEBUG LOGGER ***/
	public void debug(String message){
		Log.d(DEFAULT_TAG, message);
	}
	
	public void debug(String TAG, String message){
		Log.d(TAG, message);
	}
	
	public void debug(String message, Throwable e ){	
		Log.d(DEFAULT_TAG, message, e);
	}
	
	public void debug(String TAG, String message, Throwable e ){	
		Log.d(TAG, message, e);
	}
	
	
	
	/*** ERROR LOGGER ***/
	
	public void error(Throwable e){
		Log.e(DEFAULT_TAG, null, e);
	}
	
	public void error(String message){
		Log.e(DEFAULT_TAG, message);
	}
	
	public void error(String TAG, String message){
		Log.e(TAG, message);
	}
	
	public void error(String message, Throwable e ){	
		Log.e(DEFAULT_TAG, message, e);
	}
	
	public void error(String TAG, String message, Throwable e ){	
		Log.e(TAG, message, e);
	}
	
	
}
